import { createSlice } from '@reduxjs/toolkit';

export const personSlice = createSlice({
  name: 'person',
  initialState: {
    age: 1,
  },
  reducers: {
    incrementAge: (state, action) => {
      state.age += action.payload;
    },
  }
});

export const { incrementAge } = personSlice.actions;
export default personSlice.reducer;
